package homeworke.question18;

/**
 * Author：毕龙
 * Date: 2024/4/18 19:39
 */
public class Account {
    private long id;
    private double balance;
    private String password;

    public Account() {
    }

    public Account(long id, String password) {
        this.id = id;
        this.password = password;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public String getPassword() {
        return null;
    }

    public void setPassword(String password) {
        if(password.length() == 6){
            this.password = password;
        }
    }


    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", balance=" + balance +
                ", password='" + password + '\'' +
                '}';
    }
}
